package com.zb.Service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.zb.Service.FiletypeService;
import com.zb.entity.Filetype;
import com.zb.mapper.FiletypeMapper;


@Component
public class FiletypeServiceImpl implements FiletypeService{
	@Autowired
	private FiletypeMapper fm;
	public List<Filetype> getTypeList() {
		return fm.getTypeList();
	}
	public String getNameById(int id) {
		return fm.getNameById(id);
	}
	public int updateType(String name, int state) {
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("name", name);
		map.put("state", state);
		return fm.updateType(map);
	}
	public List<Filetype> getAllTypeList() {
		return fm.getAllTypeList();
	}
}